package userinput;

public class RangeQuery {
	//variables
	private boolean point;
	private int topLeft;
	private int bottomRight;
	
	//range search
	public RangeQuery(int topLeft, int bottomLeft) {
		this.point = false;;
		this.topLeft = topLeft;
		this.bottomRight = bottomLeft;
	}
	
	//point search
	public RangeQuery(int topLeft) {
		this.point = true;
		this.topLeft = topLeft;
		this.bottomRight = topLeft;
	}
	
	//for testing purposes
	public String toString(){
		if(point){
			return Integer.toString(topLeft);
		}
		else{
			return Integer.toString(topLeft) + "," + Integer.toString(bottomRight);
		}
	}
	
	//getters setters
	public boolean isPoint() {
		return point;
	}
	public void setPoint(boolean point) {
		this.point = point;
	}
	public int getTopLeft() {
		return topLeft;
	}
	public void setTopLeft(int topLeft) {
		this.topLeft = topLeft;
	}
	public int getBottomLeft() {
		return bottomRight;
	}
	public void setBottomLeft(int bottomLeft) {
		this.bottomRight = bottomLeft;
	}

}
